package com.hqd.ch03.v51.boot;

import com.hqd.ch03.v51.context.ApplicationEvent;

public class ExitCodeEvent extends ApplicationEvent {

    private final int exitCode;

    /**
     * Create a new {@link ExitCodeEvent} instance.
     *
     * @param source   the source of the event
     * @param exitCode the exit code
     */
    public ExitCodeEvent(Object source, int exitCode) {
        super(source);
        this.exitCode = exitCode;
    }

    /**
     * Return the exit code that will be used to exit the JVM.
     *
     * @return the exit code
     */
    public int getExitCode() {
        return this.exitCode;
    }

}

